Time-Series Constraints: Improvements and Application in CP and MIP Contexts

نویسندگان

  • Ekaterina Arafailova
  • Nicolas Beldiceanu
  • Rémi Douence
  • Pierre Flener
  • María Andreína Francisco Rodríguez
  • Justin Pearson
  • Helmut Simonis
چکیده

A checker for a constraint on a variable sequence can often be compactly specified by an automaton, possibly with accumulators, that consumes the sequence of values taken by the variables; such an automaton can also be used to decompose its specified constraint into a conjunction of logical constraints. The inference achieved by this decomposition in a CP solver can be boosted by automatically generated implied constraints on the accumulators, provided the latter are updated in the automaton transitions by linear expressions. Automata with nonlinear accumulator updates can be automatically synthesised for a large family of time-series constraints. In this paper, we describe and evaluate extensions to those techniques. First, we improve the automaton synthesis to generate automata with fewer accumulators. Second, we decompose a constraint specified by an automaton with accumulators into a conjunction of linear inequalities, for use by a MIP solver. Third, we generalise the implied constraint generation to cover the entire family of time-series constraints. The newly synthesised automata for time-series constraints outperform the old ones, for both the CP and MIP decompositions, and the generated implied constraints boost the inference, again for both the CP and MIP decompositions. We evaluate CP and MIP solvers on a prototypical application modelled using time-series constraints. 1 Context and Motivation Frameworks are given in [4,14] for specifying a constraint on a sequence of variables in a high-level way by means of a finite automaton, possibly augmented with accumulators in the framework of [4]. An automaton can be seen as a checker for ground instances of the specified constraint. For example, in a nonogram puzzle, a row constrained to contain two stretches of black cells, of lengths 4 and 3 in this order, separated by at least one white cell but preceded and followed by any amounts of white cells, can be checked by an automaton equivalent to the regular expression w∗bw+bw∗, where the row is represented by a sequence of variables whose domain value ‘w’ stands for white and ‘b’ for black. Accumulators enable the specification of a constraint γ on a variable sequence X by an automaton whose size does not depend on the length of X: accumulators are initialised at the start state and are updated through the transitions; upon acceptance, the accumulators are linked to another variable of γ via an arithmetic constraint. For example, one could constrain the number of white cells between the two black stretches in the nonogram constraint above to be at most half the length of the row. The framework of [14] lifts an automaton without accumulators into a propagator for the specified constraint; it maintains domain consistency in polynomial time. The more general framework of [4] lifts an automaton, possibly with accumulators, into a decomposition of the specified constraint in terms of constraints with existing propagators; in the presence of accumulators, this decomposition does not maintain domain consistency in general [2]. Encoding the potential accumulator values in the states of the automaton may lead to an exponentially large automaton. In this paper, we focus on automata with accumulators. The propagation achieved by the automaton decomposition of [4] in a CP solver can be boosted by invariants, seen as implied constraints, on the accumulators. If the latter are updated in the automaton transitions by linear expressions on the accumulators — such as increments and decrements by constant amounts (as in c := c + 1) or by other accumulators (as in c := c + r), or resets (as in c := 0) — then such implied constraints can be automatically generated [11]. Automata with non-linear accumulator updates can be automatically synthesised for a large family of structural time-series constraints [3]. A time series is here a sequence of integers, corresponding to measurements taken over a time interval. Time series are common in many application areas, such as the power output of electric power stations over multiple days, or environmental data (temperature, humidity, CO2 level) in buildings. Time series are constrained by physical or organisational limits, which restrict the evolution of the series. After a summary of the background material in Section 2, the contributions and impact of this paper are as follows: – We improve the automated automaton synthesis of [3] so as to synthesise automata with fewer accumulators and simpler accumulator updates, using fewer ‘min’ and ‘max’ operators, say (Section 3). – We decompose a constraint specified by an automaton with accumulators into a linear-sized conjunction of linear inequalities, for use by a mixedinteger programming (MIP) solver (Section 4). – We generalise the implied constraint generation of [11] so as to cover the entire family of time-series constraints of [3] and to rank the generated implied constraints by decreasing propagation strength, thereby easing the human selection of which implied constraints actually to use (Section 5). – We show that the newly synthesised automata for time-series constraints outperform the automata of [3], for both the CP and MIP decompositions, and that the newly generated implied constraints boost the inference, again for both the CP and MIP decompositions (Section 6). – We evaluate CP and MIP solvers on a prototypical application modelled with the help of time-series constraints (Section 7). 2 Specifying (Time-Series) Constraints using Automata We showed in [3] that many constraints γ(N, 〈X0, . . . , Xn−1〉) on an unknown time series 〈X0, . . . , Xn−1〉 of given length n can be specified as a triple 〈p, f, g〉, where p is a regular expression over the alphabet {<,=, >} and is called the pattern; f ∈ {max, min, one, range, surface, width} is called the feature; and g ∈ {Max, Min, Sum} is called the aggregator. The semantics is that integer variable N is required to be the aggregation, computed using g, of the list of features f of all maximal words matching p within the sequence 〈S0, . . . , Sn−2〉 of variables, called the signature sequence, which is linked to the time series via the signature constraints (Xi < Xi+1 ⇔ Si = ‘<’) ∧ (Xi = Xi+1 ⇔ Si = ‘=’) ∧ (Xi > Xi+1 ⇔ Si = ‘>’) for all i ∈ [0, n − 2]. A list of 23 patterns was identified, giving 266 constraints. We now introduce our running example. Example 1. The MaxWidthStrictlyDecreasingSequence(N,X) constraint, requiring N to be the maximum width of the maximal strictly decreasing sequences within the time series X, is specified by the pattern >, the feature width, and the aggregator Max. The time series 〈4, 4, 3, 2, 2, 6, 3, 5〉 contains two maximal strictly decreasing sequences, namely 4 > 3 > 2 and 6 > 3, of widths 3 and 2, so their maximum width isN = 3. The following figure shows how to check MaxWidthStrictlyDecreasingSequence(3, 〈4, 4, 3, 2, 2, 6, 3, 5〉) by (I) building the signature sequence by comparing adjacent time-series values; (II) finding all maximal words matching the regular expression >; (III) computing the feature width of each such strictly decreasing sequence; and (IV) aggregating the feature values using the Max aggregator:

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Improved Linearization of Constraint Programming Models

Constraint Programming (CP) standardizes many specialized “global constraints” allowing high-level modelling of combinatorial optimization and feasibility problems. Current Mixed-Integer Linear Programming (MIP) technology lacks both a modelling language and a solving mechanism based on high-level constraints. MiniZinc is a solver-independent CP modelling language. The solver interface works by...

متن کامل

Detecting Infeasibility and Generating Cuts for MIP using CP

We study a hybrid MIP/CP solution approach in which CP is used for detecting infeasibilities and generating cuts within a branch-and-cut algorithm for MIP. Our framework applies to MIP problems augmented by monotone constraints that can be handled by CP. We illustrate our approach on a generic multiple machine scheduling problem, and compare it to other hybrid MIP/CP algorithms.

متن کامل

طراحی و توسعه یک حسگر الکتروشیمیایی اصلاح شده با پلیمر قالب مولکولی و نانولوله های کربنی به منظور ارزیابی مواجهات محیطی و شغلی با آفت کش دی‌کلران

Background and aims: Dicloran pesticide is used to inhibit the fungal spore germination for different crops. Due to the increasing application of pesticides, evaluating the occupational and environmental exposures by reliable and accurate analytical methods is necessary. This work was aimed to design the high selective sensor to determine the dicloran in biological and environmental samples. ...

متن کامل

طراحی و ساخت یک سنسور الکتروشیمیایی با ویژگی اندازه گیری دیازینون در پایش‌های محیطی و بیولوژیکی

Diazinon is commonly used for pest control in the agricultural fields because of its relatively low cost and high efficiency. Due to the increasing application of pesticides, reliable and accurate analytical methods are necessary for their monitoring. This work was aimed to design the high selective electrochemical sensor for determining of diazinon in biological and environmental samples. The ...

متن کامل

A Constraint Programming Approach to Multi-Robot Task Allocation and Scheduling in Retirement Homes

We study the application of constraint programming (CP) to the planning and scheduling of multiple social robots interacting with residents in a retirement home. The robots autonomously organize and facilitate group and individual activities among residents. The application is a multi-robot task allocation and scheduling problem in which task plans must be determined that integrate with residen...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2016